﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" x:Class="ProjectEF6.PanelA"
        Title="Admin" Height="346" Width="448" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <DataTemplate x:Key="reservationTemplateC">
            <!--<TextBlock Text="{Binding StartDate  EndDate}"/>-->
            <TextBlock  TextAlignment="Center" x:Name="datToDat">
                <TextBlock.Text>
                    <MultiBinding StringFormat="{}{0:dd-MM-yyyy   HH:mm}   tot   {1:dd-MM-yyyy   HH:mm}">
                        <Binding Path="StartDate" />
                        <Binding Path="EndDate" />
                    </MultiBinding>
                </TextBlock.Text>
            </TextBlock>
        </DataTemplate>
        <DataTemplate x:Key="bedrijvenTemplate">
            <TextBlock Text="{Binding Name}"/>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <TabControl x:Name="tabControlAdmin" HorizontalAlignment="Left" Height="317" VerticalAlignment="Top" Width="442">
            <TabItem x:Name="tabBedrijven" Header="Bedrijven">
                <Grid Background="#FFE5E5E5">
                    <Grid.Resources>
                        <DataTemplate x:Key="bedrijvenTemplate">
                            <TextBlock Text="{Binding Name}"/>
                        </DataTemplate>
                    </Grid.Resources>

                    <ListBox ScrollViewer.VerticalScrollBarVisibility="Visible" ItemTemplate="{StaticResource bedrijvenTemplate}" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding}" x:Name="listboxBedrijven" HorizontalAlignment="Left" Height="241" Margin="10,10,0,0" VerticalAlignment="Top" Width="172"/>

                    <Label x:Name="lblBedId" Content="{Binding Id}" HorizontalAlignment="Left" Margin="277,10,0,0" VerticalAlignment="Top" Height="24" Width="146" Grid.ColumnSpan="2"/>
                    <Label x:Name="lblBedNaam" Content="{Binding Name}" HorizontalAlignment="Left" Margin="277,34,0,0" VerticalAlignment="Top" Height="24" Width="147" Grid.ColumnSpan="2"/>
                    <Label x:Name="lblBedStraat"  Content="{Binding Street}" HorizontalAlignment="Left" Margin="277,58,0,0" VerticalAlignment="Top" Height="24" Width="146" Grid.ColumnSpan="2"/>
                    <Label x:Name="lblBedPost"  Content="{Binding Zipcode}" HorizontalAlignment="Left" Margin="277,82,0,0" VerticalAlignment="Top" Height="24" Width="147" Grid.ColumnSpan="2"/>
                    <Label x:Name="lblBedStad" Content="{Binding City}" HorizontalAlignment="Left" Margin="277,106,0,0" VerticalAlignment="Top" Height="24" Width="147" Grid.ColumnSpan="2"/>
                    <Label x:Name="lblBedLand"  Content="{Binding Country}" HorizontalAlignment="Left" Margin="277,130,0,0" VerticalAlignment="Top" Height="24" Width="147" Grid.ColumnSpan="2"/>
                    <Label x:Name="lblBedEmail"  Content="{Binding Email}" HorizontalAlignment="Left" Margin="277,154,0,0" VerticalAlignment="Top" Height="24" Width="147"/>
                    <Label x:Name="lblBedTelefoon"  Content="{Binding Phone}" HorizontalAlignment="Left" Margin="277,178,0,0" VerticalAlignment="Top" Height="24" Width="147"/>
                    <Label x:Name="lblBedPersoneel" Content="{Binding Employees}" HorizontalAlignment="Left" Margin="277,202,0,0" VerticalAlignment="Top" Height="24" Width="147"/>


                    <Label Content="Bedrijf ID:" HorizontalAlignment="Left" Margin="187,10,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Straat:" HorizontalAlignment="Left" Margin="187,58,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Postcode:" HorizontalAlignment="Left" Margin="187,82,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Stad:" HorizontalAlignment="Left" Margin="187,106,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Naam:" HorizontalAlignment="Left" Margin="187,34,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Land:" HorizontalAlignment="Left" Margin="187,130,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Email:" HorizontalAlignment="Left" Margin="187,154,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Telefoon:" HorizontalAlignment="Left" Margin="187,178,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Personeel:" HorizontalAlignment="Left" Margin="187,202,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Button x:Name="btnDeleteBedrijf" Content="Delete Bedrijf" Margin="187,231,135,0" VerticalAlignment="Top" Click="btnDeleteBedrijf_Click"/>
                    <Button x:Name="btnEditBedrijf" Content="Bewerk Bedrijf" HorizontalAlignment="Left" Margin="306,231,0,0" VerticalAlignment="Top" Width="118" Click="btnEditBedrijf_Click" />

                </Grid>
            </TabItem>
            <TabItem x:Name="tabNieuwBedrijf" Header="Nieuw Bedrijf">
                <Grid Background="#FFE5E5E5">
                    <TextBox x:Name="txtName" HorizontalAlignment="Left" Height="23" Margin="132,19,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
                    <TextBox x:Name="txtStreet" HorizontalAlignment="Left" Height="23" Margin="132,47,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
                    <TextBox x:Name="txtZipcode" HorizontalAlignment="Left" Height="23" Margin="132,75,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
                    <TextBox x:Name="txtCity" HorizontalAlignment="Left" Height="23" Margin="132,103,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
                    <TextBox x:Name="txtCountry" HorizontalAlignment="Left" Height="23" Margin="132,131,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
                    <TextBox x:Name="txtEmail" HorizontalAlignment="Left" Height="23" Margin="132,159,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
                    <TextBox x:Name="txtTelephone" HorizontalAlignment="Left" Height="23" Margin="132,187,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
                    <TextBox x:Name="txtEmployees" HorizontalAlignment="Left" Height="23" Margin="132,215,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
                    <Label Content="Naam" HorizontalAlignment="Left" Margin="32,19,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Straat" HorizontalAlignment="Left" Margin="32,47,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Postcode" HorizontalAlignment="Left" Margin="32,75,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Stad" HorizontalAlignment="Left" Margin="32,103,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Land" HorizontalAlignment="Left" Margin="32,131,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Email" HorizontalAlignment="Left" Margin="32,159,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Telefoon" HorizontalAlignment="Left" Margin="32,187,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Personeel" HorizontalAlignment="Left" Margin="32,215,0,0" VerticalAlignment="Top" Width="95"/>
                    <Button x:Name="btnAddCompany" Content="Maak Bedrijf" HorizontalAlignment="Left" Margin="267,221,0,0" VerticalAlignment="Top" Width="159" Click="btnAddCompany_Click"/>
                </Grid>
            </TabItem>
            <TabItem x:Name="tabReservaties" Header="Reservaties">
                <Grid Background="#FFE5E5E5">
                    <Calendar x:Name="calendarReservations" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" SelectedDatesChanged="calendarReservations_SelectedDatesChanged"/>
                    <Label x:Name="lblCompanyC" Content="{Binding Id}" HorizontalAlignment="Left" Margin="284,15,0,0" VerticalAlignment="Top" Height="24" Width="146"/>
                    <Label x:Name="lblStartDateC" ContentStringFormat="{}{0:dd-MM-yyyy HH:mm}" Content="{Binding StartDate}" HorizontalAlignment="Left" Margin="284,63,0,0" VerticalAlignment="Top" Height="24" Width="146"/>
                    <Label x:Name="lblEndDateC" ContentStringFormat="{}{0:dd-MM-yyyy HH:mm}" Content="{Binding EndDate}" HorizontalAlignment="Left" Margin="284,87,0,0" VerticalAlignment="Top" Height="24" Width="147"/>
                    <Label x:Name="lblCompanyIDC" Content="{Binding Name}" HorizontalAlignment="Left" Margin="284,111,0,0" VerticalAlignment="Top" Height="24" Width="147"/>
                    <Label x:Name="lblLocationC" Content="{Binding locationName}" HorizontalAlignment="Left" Margin="284,39,0,0" VerticalAlignment="Top" Height="24" Width="147"/>
                    <Label x:Name="lblCreateDateC" ContentStringFormat="{}{0:dd-MM-yyyy HH:mm}" Content="{Binding CreateDate}" HorizontalAlignment="Left" Margin="284,135,0,0" VerticalAlignment="Top" Height="24" Width="147"/>
                    <Label Content="Reservation ID:" HorizontalAlignment="Left" Margin="194,15,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Start date:" HorizontalAlignment="Left" Margin="194,63,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="End date:" HorizontalAlignment="Left" Margin="194,87,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Company:" HorizontalAlignment="Left" Margin="194,111,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Location:" HorizontalAlignment="Left" Margin="194,39,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Create Date:" HorizontalAlignment="Left" Margin="194,135,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <ListBox HorizontalContentAlignment="Stretch" ScrollViewer.VerticalScrollBarVisibility="Visible" ItemTemplate="{StaticResource reservationTemplateC}" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding}" x:Name="listboxReservationsC"  Margin="10,188,12,12" Width="414"/>
                </Grid>

            </TabItem>
            <TabItem x:Name="tabContracten" Header="Contracten">
                <Grid Background="#FFE5E5E5">
                    <Grid.Resources>
                        <DataTemplate x:Key="contractTemplate">
                            <!--<TextBlock Text="{Binding StartDate  EndDate}"/>-->
                            <TextBlock  TextAlignment="Center" x:Name="datToDatCon">
                                <TextBlock.Text>
                                    <MultiBinding StringFormat="{}{0:dd-MM-yyyy}   tot   {1:dd-MM-yyyy}">
                                        <Binding Path="StartDate" />
                                        <Binding Path="EndDate" />
                                    </MultiBinding>
                                </TextBlock.Text>
                            </TextBlock>
                        </DataTemplate>
                    </Grid.Resources>
                    <ListBox HorizontalContentAlignment="Stretch" ScrollViewer.VerticalScrollBarVisibility="Visible" ItemTemplate="{StaticResource contractTemplate}" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding}" x:Name="listboxContracten" HorizontalAlignment="Left" Height="116" Margin="10,10,0,0" VerticalAlignment="Top" Width="416"/>

                    <Label x:Name="lblConId" Content="{Binding Id}" HorizontalAlignment="Left" Margin="128,131,0,0" VerticalAlignment="Top" Height="24" Width="146"/>
                    <Label x:Name="lblConMaxhours"  Content="{Binding StartDate}" HorizontalAlignment="Left" Margin="127,155,0,0" VerticalAlignment="Top" Height="24" Width="146"/>
                    <Label x:Name="lblBedPost_Copy"  Content="{Binding EndDate}" HorizontalAlignment="Left" Margin="127,179,0,0" VerticalAlignment="Top" Height="24" Width="147"/>
                    <Label x:Name="lblBedStad_Copy" Content="{Binding CompanyId}" HorizontalAlignment="Left" Margin="127,203,0,0" VerticalAlignment="Top" Height="24" Width="147"/>
                    <Label x:Name="lblBedLand_Copy"  Content="{Binding ContractFormulaId}" HorizontalAlignment="Left" Margin="127,227,0,0" VerticalAlignment="Top" Height="24" Width="147"/>

                    <Label Content="Contract ID:" HorizontalAlignment="Left" Margin="13,131,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Start Datum:" HorizontalAlignment="Left" Margin="13,155,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Eind Datum:" HorizontalAlignment="Left" Margin="13,179,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Bedrijf ID:" HorizontalAlignment="Left" Margin="13,203,0,0" VerticalAlignment="Top" Height="24" Width="90"/>
                    <Label Content="Contract Formula" HorizontalAlignment="Left" Margin="13,227,0,0" VerticalAlignment="Top" Height="24" Width="109"/>
                    <Button x:Name="btnStopContract" Content="Stop Contract" HorizontalAlignment="Left" Margin="273,135,0,0" VerticalAlignment="Top" Width="151" Click="btnStopContract_Click"/>


                </Grid>
            </TabItem>
            <TabItem x:Name="tabNieuwContract" Header="Nieuw Contract">
                <Grid Background="#FFE5E5E5">
                    <Label Content="StartDate" HorizontalAlignment="Left" Margin="32,54,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Company" HorizontalAlignment="Left" Margin="32,81,0,0" VerticalAlignment="Top" Width="95"/>
                    <Label Content="Contract Formula" HorizontalAlignment="Left" Margin="32,110,0,0" VerticalAlignment="Top" Width="105"/>
                    <Button x:Name="btnAddContract" Content="Maak Contract" HorizontalAlignment="Left" Margin="223,160,0,0" VerticalAlignment="Top" Width="159" Click="btnAddContract_Click"/>
                    <xctk:DateTimePicker x:Name="datepickerStart" Margin="142,50,54,183" />
                    <ComboBox x:Name="cmbContractFormula" Margin="142,112,54,127"/>
                    <ComboBox x:Name="cmbCompany" HorizontalAlignment="Left" Margin="142,85,0,0" VerticalAlignment="Top" Width="240"/>
                </Grid>
            </TabItem>
            <TabItem x:Name="tabRunningContracts" Header="Lopende Contracten">
                <Grid Background="#FFE5E5E5">
                    <Grid.Resources>
                        <DataTemplate x:Key="contractTemplate2">
                            <!--<TextBlock Text="{Binding StartDate  EndDate}"/>-->
                            <TextBlock  TextAlignment="Center" x:Name="datToDatCon">
                                <TextBlock.Text>
                                    <MultiBinding StringFormat="{}{0:dd-MM-yyyy}   tot   {1:dd-MM-yyyy}">
                                        <Binding Path="StartDate" />
                                        <Binding Path="EndDate" />
                                    </MultiBinding>
                                </TextBlock.Text>
                            </TextBlock>
                        </DataTemplate>
                    </Grid.Resources>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="16*"/>
                        <ColumnDefinition Width="25*"/>
                        <ColumnDefinition Width="177*"/>
                    </Grid.ColumnDefinitions>
                    <ListBox HorizontalContentAlignment="Stretch" ScrollViewer.VerticalScrollBarVisibility="Visible" ItemTemplate="{StaticResource contractTemplate2}" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding}" x:Name="listboxContracts"  Margin="11,10,9,139" Grid.ColumnSpan="3"/>

                    <Label x:Name="lblIdCon" Content="{Binding Id}" HorizontalAlignment="Left" Margin="40,131,0,0" VerticalAlignment="Top" Height="24" Width="146" Grid.Column="2"/>
                    <Label x:Name="lblStartDateCon" ContentStringFormat="{}{0:dd-MM-yyyy HH:mm}" Content="{Binding StartDate}" HorizontalAlignment="Left" Margin="40,155,0,0" VerticalAlignment="Top" Height="24" Width="146" Grid.Column="2"/>
                    <Label x:Name="lblEndDateCon" ContentStringFormat="{}{0:dd-MM-yyyy HH:mm}" Content="{Binding EndDate}" HorizontalAlignment="Left" Margin="40,179,0,0" VerticalAlignment="Top" Height="24" Width="147" Grid.Column="2"/>
                    <Label x:Name="lblCompanyIDCon" Content="{Binding CompanyId}" HorizontalAlignment="Left" Margin="40,203,0,0" VerticalAlignment="Top" Height="24" Width="147" Grid.Column="2"/>
                    <Label x:Name="lblContractFormulaCon" Content="{Binding ContractFormulaId}" HorizontalAlignment="Left" Margin="39,227,0,0" VerticalAlignment="Top" Height="24" Width="147" Grid.Column="2"/>
                    <Label Content="Contract ID:" HorizontalAlignment="Left" Margin="13,131,0,0" VerticalAlignment="Top" Height="24" Width="90" Grid.ColumnSpan="3"/>
                    <Label Content="Start date:" HorizontalAlignment="Left" Margin="13,155,0,0" VerticalAlignment="Top" Height="24" Width="90" Grid.ColumnSpan="3"/>
                    <Label Content="End date:" HorizontalAlignment="Left" Margin="13,179,0,0" VerticalAlignment="Top" Height="24" Width="90" Grid.ColumnSpan="3"/>
                    <Label Content="Company:" HorizontalAlignment="Left" Margin="13,203,0,0" VerticalAlignment="Top" Height="24" Width="90" Grid.ColumnSpan="3"/>
                    <Label Content="Contract Forumla:" HorizontalAlignment="Left" Margin="13,227,0,0" VerticalAlignment="Top" Height="24" Width="103" Grid.ColumnSpan="3"/>
                    <Button x:Name="btnStopLopendContract" Content="Stop Contract" Grid.Column="2" HorizontalAlignment="Left" Margin="191,135,0,0" VerticalAlignment="Top" Width="151" Click="btnStopLopendContract_Click"/>

                </Grid>
            </TabItem>
        </TabControl>

    </Grid>
</Window>
